import React, { Component } from 'react'

import ReactDOM from 'react-dom'
import { Router, Route, Link, IndexLink, hashHistory, IndexRoute } from 'react-router'
import Layout from './components/layout'
import Info from './containers/info'
import Video, { HistoryVideo } from './containers/video'
import ExternalLink, {EditeExternalLink} from './containers/externalLink' 

ReactDOM.render(<Router history={hashHistory}>
    <Route path="/" component={Layout}>
        <IndexRoute component={Info} />
        <Route path="/info" component={Info}></Route>
        <Route path="/playVideo(/:id)" component={Video} ></Route>
        <Route path="/historyVideo(/:page)" component={HistoryVideo}></Route>
        <Route path="/externalLink(/:metaId)(/:page)" component={ExternalLink}></Route>
        <Route path="/externalLinks/:page" component={ExternalLink}></Route>
        <Route path="/editExternalLink/:id" component={EditeExternalLink}></Route>
        <Route path="/createExternalLink/:metaId" component={EditeExternalLink}></Route>
    </Route>
    {/* <Route path="/printPostInfo/:id" component={PrintPostInfo}></Route> */}
</Router>, document.querySelector("#app"))